package cn.drenal.capcap.entity;

import cn.drenal.capcap.entity.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.tangzc.autotable.annotation.ColumnComment;
import com.tangzc.autotable.annotation.ColumnNotNull;
import com.tangzc.autotable.annotation.Index;
import com.tangzc.mpe.autotable.annotation.*;
import com.tangzc.mpe.processer.annotation.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 作品图片关联表
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper
@Table(comment = "作品图片关联表")
public class ArtworkImage extends BaseEntity {
    @ColumnComment("主键")
    @ColumnId(mode = IdType.AUTO)
    private Long id;

    @ColumnComment("作品ID")
    @ColumnNotNull
    @Index
    private String artworkId;

    @ColumnComment("图片路径")
    @ColumnNotNull
    private String imagePath;

    @ColumnComment("排序")
    private Integer sort;

    @ColumnComment("是否为封面：0-否，1-是")
    private Integer isCover;
}